import qs from "qs"
import request from "@/request/request.js"

//用户信息get请求
export const UserProfiles = () => request.get('/shop/userProfiles')
//商品详情页面
export const GoodDetailsAPI = (id) => request.get(`/products/${id}`)
export const JingpinAPI = () => request.get('/products/recommend')
export const ReMenAPI = () => request.get('/products/hot')
export const SendSMSAPI = (params) => request.post('/sendSMS', qs.stringify(params))
export const PhoneReginAPI = (params) => request.post('/phoneRegin', qs.stringify(params))
export const WeixinLoginApi = (params) => request.post('/wechatUsers/PCLogin', qs.stringify(params))

//手机绑定微信 
export const BindingAPI = (params) => request.post("/wechatUsers/binding", qs.stringify(params));

//CartsAddAPI
export const CartsAddAPI = (params) => request.post("/shop/carts/add", qs.stringify(params));

//全部商品
export const GoodsSearchAPI = (params) => request.get("/products", { params });


//查看购物车
export const ShopCartssAPI = () => request.get("/shop/carts");

//删除商品
export const DeleteShopCartssAPI = (params) => request.delete(`/shop/carts?productIds=${params}`);